fix(dashboard): stabilize add panel flyout group order and count assertions#268197
Closed
gsoldevila wants to merge 1 commit into
Closed
fix(dashboard): stabilize add panel flyout group order and count assertions#268197gsoldevila wants to merge 1 commit into
gsoldevila wants to merge 1 commit into
Conversation
|
Pinging @elastic/kibana-core (Team:Core) |
…rtions Two separate issues caused this test to be skipped (see elastic#268101): 1. Group ordering: mlGroup and logs-aiopsGroup both default to order 0 in getMenuItemGroups, making their relative DOM position non-deterministic (depends on async action registration order). Sort both arrays before comparing so the test verifies group presence without relying on tie-broken ordering. 2. Panel count for ES serverless: xpack.ml.ad.enabled is false in config/serverless.es.yml, so the 3 Anomaly Detection actions (swim lane, anomaly charts, single metric viewer) fail their isCompatible check (canGetJobs) and are excluded from the flyout. The expected count for the 'es' project type is 17, not 20. Split the 'es' and 'security' cases in getExpected to reflect this. Fixes elastic#268101 Co-authored-by: Cursor <cursoragent@cursor.com>
fae143f to
ab97e96
Compare
Member
Author
|
We should fix the RC: registering things async |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the two issues that caused the test to be skipped in #268101.
1. Group ordering flakiness
mlGroupandlogs-aiopsGroupboth define no explicitorderin theirPresentableGroupdefinition, so both getorder: 0insidegetMenuItemGroups. When two groups tie on order,Array.sortproduces a non-deterministic result — their relative DOM position depends on async action registration order, which varies across CI runs.Fix: sort both arrays before comparing, so the test verifies that the correct set of groups exists without being sensitive to tie-broken ordering.
2. Wrong expected panel count for ES serverless
config/serverless.es.ymlsetsxpack.ml.ad.enabled: false. The three Anomaly Detection actions (create-anomaly-swimlane,create-anomaly-charts,create-single-metric-viewer) all callcheckPermissionAsync(getStartServices, 'canGetJobs')in theirisCompatiblecheck. With AD disabled, all three returnfalseand are excluded from the flyout — 17 panels, not 20.securityserverless hasxpack.ml.ad.enabled: true, so it correctly gets 20. The previous test code groupedesandsecurityunder the same expected values. Fix: split them.Related